home *** CD-ROM | disk | FTP | other *** search
/ The Guru Press Kit / The Guru Press Kit.iso / pc / theguru.dxr / 00039_helloagain.ls < prev    next >
Encoding:
Text File  |  2002-12-17  |  2.2 KB  |  59 lines

  1. global wherearefiles, theresAnImage, whereToCopy, copyFolder, thePath, gKeepCopying, theText, theresthetext, whereistext, thetextfiles, copyfoldertext, gCount, gListOfSelections, gPosters
  2.  
  3. on twoprogressbar vDoc, vImagesFolder
  4.   register(xtra("ProgressCopy"), "zmqtdnhmr68j")
  5.   getDestFromUser()
  6.   if the platform contains "Mac" then
  7.     thetextcopy = whereToCopy & "JustMarriedimages:"
  8.     Ok = baCreateFolder(thePath & "images")
  9.     Ok = baCreateFolder(thePath & "images:" & "Documents")
  10.     wherearefiles = the moviePath & "images:"
  11.     whereistext = the moviePath & "Documents:"
  12.     copyFolder = thePath & "images:"
  13.     copyfoldertext = copyFolder & "Documents:"
  14.   else
  15.     thetextcopy = whereToCopy & "JustMarriedimages\"
  16.     Ok = baCreateFolder(thePath & "images")
  17.     Ok = baCreateFolder(thetextcopy & "Documents")
  18.     wherearefiles = the moviePath & "images\"
  19.     whereistext = the moviePath & "Documents\"
  20.     copyFolder = thePath & "images\"
  21.     copyfoldertext = thetextcopy & "Documents\"
  22.   end if
  23.   vposters = []
  24.   if gPosters[1][2] = "yes" then
  25.     vposters.add(1)
  26.   end if
  27.   if gPosters[2][2] = "yes" then
  28.     vposters.add(2)
  29.   end if
  30.   repeat with x = 1 to vposters.count
  31.     oneFile = new(xtra("progresscopy"), 1, 100, 100)
  32.     vNum = vposters[x]
  33.     vPosterName = member("posterNames").text.line[vNum]
  34.     copyFile(oneFile, wherearefiles & vPosterName, copyFolder & vPosterName, 1, 1, 1)
  35.     put errorString(oneFile) into field "error"
  36.   end repeat
  37.   if gListOfSelections.count > 0 then
  38.     repeat with x = 1 to gListOfSelections.count
  39.       oneFile = new(xtra("progresscopy"), 1, 100, 100)
  40.       vNum = gListOfSelections[x]
  41.       vlargeName = member("largeNames").text.line[vNum]
  42.       copyFile(oneFile, wherearefiles & vlargeName, copyFolder & vlargeName, 1, 1, 1)
  43.       put errorString(oneFile) into field "error"
  44.     end repeat
  45.   end if
  46.   copyFile(oneFile, whereistext & "captions.doc", copyfoldertext & "captions", 1, 1, 1)
  47.   go("timed")
  48. end
  49.  
  50. on getDestFromUser me
  51.   fileObj = xtra("FileXtra3").new()
  52.   if the platform contains "Mac" then
  53.     thePath = fileObj.fx_FileSaveAsDialog("Macintosh HD:", "JustMarried", "Save")
  54.   else
  55.     thePath = fileObj.fx_FileSaveAsDialog(the moviePath, "JustMarried", "Save", 1)
  56.   end if
  57.   fileObj = 0
  58. end
  59.